package desgin.pattern.structure.flyweight;

/**
 * 具体享元角色类ConcreteFlyweight有一个内蕴状态，在本例中一个Character类型的intrinsicState属性代表，
 * 它的值应当在享元对象被创建时赋予。所有的内蕴状态在对象创建之后，就不会再改变了。
 * @author shuai.zuo
 * @date 2015年3月3日
 */
public class ConcreteFiyweight implements FlyWeight {
	private Character initialState;

	public ConcreteFiyweight(Character state) {
		this.initialState = state;
	}

	@Override
	public void operation(String state) {
		// TODO Auto-generated method stub
		System.out.println("Intrinsic State = " + this.initialState);
		System.out.println("Extrinsic State = " + state);
	}

}
